﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace CollisionLib
{
    class Collision
    {
        public static bool DetectCollision(Box Object1, Box Object2)
        {
            if (Object1.X + Object1.Width >= Object2.X && Object1.Y + Object1.Width >= Object2.Y)
            {
                if (Object1.X <= Object2.X + Object2.Width && Object1.Y <= Object2.Y + Object2.Height)
                {
                    return true;
                }
            }
            return false;
        }
    }
    class Box
    {
        public int X;
        public int Y;
        public int Width;
        public int Height;
        public Box(int X, int Y, int Height, int Width)
        {
            this.X = X;
            this.Y = Y;
            this.Height = Height;
            this.Width = Width;
        }
        public void Setlocation(int X, int Y)
        {
            this.X = X;
            this.Y = Y;
        }
        public void SetSize(int Height, int Width)
        {
            this.Width = Width;
            this.Height = Height;
        }
    }
    }